home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: jlilley@ix.netcom.com (John Lilley)
- Newsgroups: comp.lang.c++
- Subject: Re: what's incomplete type?
- Date: 29 Mar 1996 16:17:14 GMT
- Organization: Netcom
- Message-ID: <4jh2ea$scq@dfw-ixnews6.ix.netcom.com>
- References: <4jce8i$7ge@geraldo.cc.utexas.edu>
- NNTP-Posting-Host: den-co11-03.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-NETCOM-Date: Fri Mar 29 10:17:14 AM CST 1996
- X-Newsreader: WinVN 0.99.7
-
- >Could anyone please tell me exactly exactly it means by "incomplete
- >type"? What's the possible reason for this "incomplete type"?
-
- An incomplete type is usually a class/struct that has been
- named, but which has not been defined in the current scope.
-
- For example:
-
- class A;
-
- void foo() {
- A a; // error: incomplete type
- A* a; // OK: pointer to incomplete type
-
- // If you try to look at *A in the debugger, it *may*
- // claim that *a is incomplete
- }
-
- class A{...};
-
- void bar() {
- A a; // OK: complete type
- }
-
-
- However, it sounds like your debugger is a little confused, since
- *this ought to always be a complete type inside a member function.
-
- john lilley
-
-